package com.longway.common.db.id;

public class OracleSeqIdFactory implements IIdFactory{
	
	private static final OracleSeqIdFactory me = new OracleSeqIdFactory();
	
	private String seqName = "";
	
	public static OracleSeqIdFactory me(String seqName) {
		me.seqName = seqName + ".nextval";
		return me;
	}

	@Override
	public Object getId() {
		if(seqName.equals("")){
			throw new IllegalArgumentException("oracle seqName can not be null.");
		}
		return seqName;
	}

}
